package com.serene.authority.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.serene.authority.admin.entity.vo.RoleVo;
import com.serene.authority.admin.entity.MyRole;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author serene
 * @createTime 2020/7/10
 */
@Mapper
public interface RoleMapper extends BaseMapper<MyRole> {

    /**
     * 分页模糊查询角色
     *
     * @param role
     * @return
     */
    List<MyRole> getFuzzyRolesByPage(MyRole role);

    /**
     * 更新角色
     *
     * @param roleDto
     * @return
     */
    int update(RoleVo roleDto);

    /**
     * 新建角色
     *
     * @param roleDto
     * @return
     */
    int saveRole(RoleVo roleDto);

}
